package cn.com.zhuxulin.info.Services;

import cn.com.zhuxulin.info.Utils.Http;
import cn.com.zhuxulin.info.Utils.ParseIP;

public class IPInfo {
//	private String url = "http://www.ip138.com/ips1388.asp?action=2&ip=";
	private String url = "http://www.dgcoo.com/ip/ip.php?format=json&charset=utf8&ip=";

	public void setIP(String ip) {
		url = url + ip;
	}

	public String[] getIPInfo() {
		//System.out.println(url);
//		return ParseIP.parseIP(Http.doGetString(url, "GBK"));
		return ParseIP.parse(Http.doGetString(url, "UTF-8"));
	}
}
